package com.tianjiancloud.exception;

/**
 * Created by Yan on 2015/2/1.
 */
public class CommonException extends RuntimeException {

    public CommonException(ExceptionCode errCode){
        this(errCode.getCode(), null);
    }

    public CommonException(Integer errCode){
        this(errCode, null);
    }

    public CommonException(Integer errCode, String errMsg){
        super(errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    private final Integer errCode;

    private final String errMsg;

    public String getErrMsg() {
        return errMsg;
    }

    public Integer getErrCode() {
        return errCode;
    }
}
